import { _decorator, Component, Node } from 'cc';

const { ccclass, property } = _decorator;
/**
 * 技能节点
 */
@ccclass('SkillItem')
export class SkillItem extends Component {


    @property(Node)
    icon: Node;
    @property(Node)
    lableName: Node;
    @property(Node)
    lableDesc: Node;

    private _onClick: () => void;
    private _target: any;


    start() {

    }

    update(deltaTime: number) {

    }

    onClick(onClick: () => void, target?: any) {
        this._onClick = onClick;
        this._target = target;
    }

    onBtnClick() {
        this._onClick?.call(this._target);
    }

}


